/*
 *    Copyright (c) 2018-2025, proj All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the proj developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: proj
 */

package com.ykht.proj.activity.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ykht.proj.activity.dto.CnActivityOrderDTO;
import com.ykht.proj.activity.entity.CnActivityOrder;
import com.ykht.proj.activity.vo.ActivityOrderVo;
import com.ykht.proj.common.core.util.R;

import javax.servlet.http.HttpServletRequest;

/**
 * 活动订单表
 *
 * @author csg
 * @date 2020-12-23 11:13:32
 */
public interface CnActivityOrderService extends IService<CnActivityOrder> {

	/**
	 * 订单列表（分页，搜索）
	 *
	 * @param page
	 * @param req
	 * @return
	 */
	IPage<CnActivityOrderDTO> getCnActivityOrderListPage(Page page, CnActivityOrderDTO req);

	/**
	 * 下单
	 * @param activityId
	 * @param shopIds
	 * @return
	 */
	R order(Long activityId, String shopIds);

	/**
	 * 取消订单
	 * @param orderId
	 * @return
	 */
	R cancelOrder(Long orderId);
	/**
	 * 订单过期
	 * @param orderId
	 * @return
	 */
	R expireOrder(Long orderId);
	/**
	 * 根据订单ID和订单状态更新订单
	 * @param orderId
	 * @param payStatus
	 * @return
	 */
	R invalidOrder(Long orderId,Integer payStatus);
	/**
	 * 支付
	 * @param orderId
	 * @return
	 */
	R pay(Long orderId);

	/**
	 * 下载订单结算数据
	 * @param req
	 */
    void downloadExcel(CnActivityOrderDTO req);

    R<ActivityOrderVo> getOrderById(Page page, Long id, String longitude, String latitude);

    R callback(String data, HttpServletRequest request);

}
